home *** CD-ROM | disk | FTP | other *** search
/ Network PC / Network PC.iso / amiga utilities / communication / internet / amitcp3.0b / netinclude / rpc / pmap_clnt.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-21  |  3.3 KB  |  89 lines

  1. /*
  2.  * $Id: pmap_clnt.h,v 1.2 1993/11/10 00:45:00 jraja Exp $
  3.  *
  4.  * $Log: pmap_clnt.h,v $
  5.  * Revision 1.2  1993/11/10  00:45:00  jraja
  6.  * ANSI prototypes.
  7.  *
  8.  */
  9. /* @(#)pmap_clnt.h    2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */
  10. /*
  11.  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  12.  * unrestricted use provided that this legend is included on all tape
  13.  * media and as a part of the software program in whole or part.  Users
  14.  * may copy or modify Sun RPC without charge, but are not authorized
  15.  * to license or distribute it to anyone else except as part of a product or
  16.  * program developed by the user.
  17.  * 
  18.  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  19.  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  20.  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  21.  * 
  22.  * Sun RPC is provided with no support and without any obligation on the
  23.  * part of Sun Microsystems, Inc. to assist in its use, correction,
  24.  * modification or enhancement.
  25.  * 
  26.  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  27.  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  28.  * OR ANY PART THEREOF.
  29.  * 
  30.  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  31.  * or profits or other special, indirect and consequential damages, even if
  32.  * Sun has been advised of the possibility of such damages.
  33.  * 
  34.  * Sun Microsystems, Inc.
  35.  * 2550 Garcia Avenue
  36.  * Mountain View, California  94043
  37.  */
  38.  
  39. /*
  40.  * pmap_clnt.h
  41.  * Supplies C routines to get to portmap services.
  42.  *
  43.  * Copyright (C) 1984, Sun Microsystems, Inc.
  44.  */
  45.  
  46. /*
  47.  * Usage:
  48.  *    success = pmap_set(program, version, protocol, port);
  49.  *    success = pmap_unset(program, version);
  50.  *    port = pmap_getport(address, program, version, protocol);
  51.  *    head = pmap_getmaps(address);
  52.  *    clnt_stat = pmap_rmtcall(address, program, version, procedure,
  53.  *        xdrargs, argsp, xdrres, resp, tout, port_ptr)
  54.  *        (works for udp only.) 
  55.  *     clnt_stat = clnt_broadcast(program, version, procedure,
  56.  *        xdrargs, argsp,    xdrres, resp, eachresult)
  57.  *        (like pmap_rmtcall, except the call is broadcasted to all
  58.  *        locally connected nets.  For each valid response received,
  59.  *        the procedure eachresult is called.  Its form is:
  60.  *    done = eachresult(resp, raddr)
  61.  *        bool_t done;
  62.  *        caddr_t resp;
  63.  *        struct sockaddr_in *raddrp;
  64.  *        where resp points to the results of the call and raddr is the
  65.  *        address if the responder to the broadcast.
  66.  */
  67.  
  68. typedef bool_t (*resultproc_t)(caddr_t resp, struct sockaddr_in *raddrp);
  69.  
  70. extern bool_t        pmap_set(u_long program, u_long version,
  71.                  int protocol, u_short port);
  72. extern bool_t        pmap_unset(u_long program, u_long version);
  73. extern struct pmaplist *pmap_getmaps(struct sockaddr_in * address);
  74. extern enum clnt_stat    pmap_rmtcall(struct sockaddr_in * addr,
  75.                      u_long prog, u_long vers, u_long proc,
  76.                      xdrproc_t xdrargs, caddr_t argsp,
  77.                      xdrproc_t xdrres, caddr_t resp,
  78.                      struct compatible_timeval tout,
  79.                      u_long * port_ptr);
  80. extern enum clnt_stat    clnt_broadcast(u_long prog, u_long vers, u_long proc,
  81.                        xdrproc_t xargs, caddr_t argsp,
  82.                        xdrproc_t xresults, caddr_t resultsp,
  83.                        resultproc_t eachresult);
  84. extern u_short        pmap_getport(struct sockaddr_in * address,
  85.                      u_long program, u_long version,
  86.                      u_int protocol);
  87.  
  88.  
  89.